<!DOCTYPE html>
<html>
 <head lang="en"> 
  <meta charset="UTF-8" /> 
  <title>忘记密码</title> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
  <meta name="format-detection" content="telephone=no" /> 
  <meta name="renderer" content="webkit" /> 
  <meta http-equiv="Cache-Control" content="no-siteapp" /> 
  <link rel="stylesheet" href="/ho/AmazeUI-2.4.2/assets/css/amazeui.css" /> 
  <link href="/ho/css/dlstyle.css" rel="stylesheet" type="text/css" /> 
  <script src="/ho/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
 </head> 
 <body> 
  <div class="login-boxtitle"> 
   <a href="/home/index"><img alt="logo" src="/ho/images/logobig.png" /></a> 
  </div> 
  <div class="login-banner"> 
   <div class="login-main"> 
    <div class="login-banner-bg">
     <span></span>
     <img src="/ho/images/big.jpg" />
    </div> 
    <div class="login-box"> 
     <h3 class="title">忘记密码</h3> 
     <div class="clear"></div> 
     <div class="login-form"> 
     @if(is_object($errors) && count($errors) > 0)
        <div style="color:red;" class="one" onclick="$(this).css('display','none')">
          验证失败：
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @elseif(is_string($errors))
      <div style="color:red;" onclick="this.style.display='none'">
          验证失败：
            <ul>
              <li>{{ $errors}}</li>
            </ul>
        </div>
    @endif
     <div>
      <form action="/home/register/forgetphone" method="post">
        {{ csrf_field() }} 
        <div class="user-phone">
                    <label for="phone">
                      <i class="am-icon-mobile-phone am-icon-md"></i>
                    </label>
                    <input type="tel" name="uphone" id="phone" placeholder="请输入手机号" value="{{ old('uphone')}}"></div>
                    <div id='ajaxphone'></div>
                  <div class="verification">
                    <label for="code">
                      <i class="am-icon-code-fork"></i>
                    </label>
                    <input type="tel" name="phonecode" id="code" placeholder="请输入验证码">
                    <a class="btn" href="javascript:void(0);" onClick="sendMobileCode();" id="sendMobileCode">
                      <button id="dyMobileButton" disabled>获取s</button></a>
                  </div>
          <script type="text/javascript">
          function sendMobileCode(){
            $.get('/home/register/phonecode',{'phone':$('#phone').val()},function(msg){
              if(msg == 2){
                alert('提交成功');
              }
            });
          }
          </script>
                  <div class="user-pass">
                    <label for="password">
                      <i class="am-icon-lock"></i>
                    </label>
                    <input type="password" name="upassword" id="password" placeholder="设置密码"></div>
                  <div class="user-pass">
                    <label for="passwordRepeat">
                      <i class="am-icon-lock"></i>
                    </label>
                    <input type="password" name="urepassword" id="passwordRepeat" placeholder="确认密码"></div>
                    <div class="am-cf">
                    <input type="submit" name="" value="重置密码" class="am-btn am-btn-primary am-btn-sm am-fl"></div>
                </form>
      <a href="/home/register/forget" style="color:blue;text-decoration:underline;">邮箱重置密码？点击此处</a>
      </div>
    </div> 
   </div> 
  </div> 
  <div class="footer "> 
   <div class="footer-hd "> 
    <p> <a href="# ">恒望科技</a> <b>|</b> <a href="# ">商城首页</a> <b>|</b> <a href="# ">支付宝</a> <b>|</b> <a href="# ">物流</a> </p> 
   </div> 
   <div class="footer-bd "> 
    <p> <a href="# ">关于恒望</a> <a href="# ">合作伙伴</a> <a href="# ">联系我们</a> <a href="# ">网站地图</a> <em>&copy; 2015-2025 Hengwang.com 版权所有</em> </p> 
   </div> 
  </div>  
  <script>
    $('#phone').blur(function(){
            var preg = /^1[34578]\d{9}$/ ;
            var str = $(this).val();
            if(preg.test(str)){
              $.get('/home/register/ajaxphone',{'uphone':$(this).val()},function (msg){
                if(msg==1){
                  $('#ajaxphone').text('√').css('color','green');
                  $('button').removeAttr('disabled');
                }else{
                  $('#ajaxphone').text('手机号不存在').css('color','red');
                }
              });
            }else{
              $('#ajaxphone').text('手机格式有误').css('color','red');
            }
          })
  </script>  
 </body>
</html>